<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>每日特价</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Microsoft YaHei', sans-serif;
        }
        
        .box {
            width: 800px;
            margin: 50px auto;
            border: 1px solid #e5e5e5;
            border-radius: 5px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        
        .top {
            display: flex;
            align-items: center;
            padding: 15px 20px;
            background-color: #f8f8f8;
            border-bottom: 1px solid #e5e5e5;
        }
        
        .top h2 {
            font-size: 18px;
            color: #333;
            margin-right: 30px;
        }
        
        .content {
            display: flex;
            list-style: none;
        }
        
        .thing {
            padding: 8px 15px;
            margin-right: 10px;
            cursor: pointer;
            border-radius: 3px;
            transition: all 0.3s;
        }
        
        .thing a {
            text-decoration: none;
            color: #666;
            font-size: 14px;
        }
        
        .thing:hover {
            background-color: #f0f0f0;
        }
        
        .thing.active, .thing.first {
            background-color: #ff0036;
        }
        
        .thing.active a, .thing.first a {
            color: white;
        }
        
        .Content {
            padding: 20px;
            position: relative;
            height: 400px;
        }
        .main {
            position: absolute;
            top: 20px;
            left: 20px;
            right: 20px;
            opacity: 0;
            transition: opacity 0.5s ease;
        }
        
        .main.active {
            opacity: 1;
        }
        
        .main img {
            width: 100%;
            height: 360px;
            object-fit: cover;
            border-radius: 3px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="top">
            <h2>三软件甘建华(240111)</h2>
            <ul class="content">
           
                    <li class="thing  active"><a href="javascript:;">精选</a ></li>
                    <li class="thing"><a href="javascript:;">美食</a ></li>
                    <li class="thing"><a href="javascript:;">百货</a ></li>
                    <li class="thing"><a href="javascript:;">个护</a ></li>
                    <li class="thing"><a href=" ">预告</a ></li>
               
            </ul>
        </div>
        <div class="Content"> 
            <div class="main active">
                <img src="./image/f70a13db8bf24ae0c3a8b0c73732eb7a.jpg" alt="">
            </div>
            <div class="main">
                <img src="./image/微信图片_20250914173110_7_103.jpg" alt="">
            </div>
             <div class="main">
                <img src="./image/微信图片_20250914174253_8_103.jpg" alt="">
            </div>
             <div class="main">
                <img src="./image/微信图片_20250914182751_15_103.jpg" alt="">
            </div>
             <div class="main">
                <img src="./image/微信图片_20250914174957_9_103.jpg" alt="">
            </div>

        </div>
    </div>
    
    <script>
        const tabs = document.querySelectorAll('.thing');
        const contents = document.querySelectorAll('.main');
        for(let i=0;i<tabs.length;i++){
            tabs[i].addEventListener('mouseenter',function(){
                for(let j=0;j<tabs.length;j++)
                {
                    tabs[j].classList.remove('active');
                }
                this.classList.add('active')
            
        
        for(let k=0;k<contents.length;k++){
           
                contents[k].classList.remove('active')
            }

                contents[i].classList.add('active')
        })
    }        
        
        
        
      
    </script>
</body>
</html>